import { request } from "../request/request";

// 登录并获取所有联系人
export const getAllContacts = (data) => {
	return request({
		url: '/account/phoneLogin',
		method: 'post',
		data: data
	})
}
// 注册
export const register = (data) => {
	return request({
		url: '/account/register',
		method: 'post',
		data: data
	})
}
// 获取验证码
export const getCode = (phone) => {
	return request({
		url: '/account/getPhoneCode?phone=' + phone,
		method: 'get'
	})
}
//获取可能认识的人
export const getPossibleContacts = () => {
	return request({
		url: '/account/possibleContacts',
		method: 'get'
	})
}
// 添加联系人
export const addContact = (data) => {
	return request({
		url: '/userContact/addContact',
		method: 'post',
		data: data
	})
}
//展示所有申请人
export const showAllApply = () => {
	return request({
		url: '/userContact/showApply',
		method: 'get'
	})
}
//同意申请
export const agreeApply = (data) => {
	return request({
		url: '/userContact/agreeApply',
		method: 'post',
		data: data
	})
}
//拒绝申请
export const refuseApply = (data) => {
	return request({
		url: '/userContact/refuseApply',
		method: 'post',
		data: data
	})
}
//删除申请
export const deleteApply = (data) => {
	return request({
		url: '/userContact/deleteApply',
		method: 'post',
		data: data
	})
}
